package com.lzh.persevere.model.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.lzh.persevere.common.BaseEntity;
import lombok.*;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 文件信息表(FileInfo)表实体类
 *
 * @author luzhiheng
 * @since 2025-07-11
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("file_info")
@Builder
@Accessors(chain = true)
@Entity
@Table(name = "file_info", indexes = {})
public class FileInfo extends BaseEntity {

    /**
     * 模块ID
     */
    @Column(name = "module_id", columnDefinition = "varchar(255) COMMENT '模块ID'")
    private String moduleId;

    /**
     * 上传后文件名
     */
    @Column(name = "upload_name", columnDefinition = "varchar(1024) COMMENT '上传后文件名'")
    private String uploadName;

    /**
     * 上传原始文件名
     */
    @Column(name = "origin_name", columnDefinition = "varchar(1024) COMMENT '上传原始文件名'")
    private String originName;

    /**
     * 上传目录
     */
    @Column(name = "upload_directory", columnDefinition = "varchar(1024) COMMENT '上传目录'")
    private String uploadDirectory;

    /**
     * 文件地址
     */
    @Column(name = "file_address", columnDefinition = "varchar(4096) COMMENT '文件地址'")
    private String fileAddress;

    /**
     * 文件大小（字节）
     */
    @Column(name = "file_size", columnDefinition = "bigint default '0' COMMENT '文件大小（字节）'")
    private Long fileSize;

    /**
     * 文件类型
     */
    @Column(name = "file_type", columnDefinition = "varchar(255) COMMENT '文件类型'")
    private String fileType;

    /**
     * IP地址
     */
    @Column(name = "ip", columnDefinition = "varchar(100) COMMENT 'IP地址'")
    private String ip;

}

